FROM golang:1.17 as build
ENV GO111MODULE=auto	
ENV GOOS=linux
ENV CGO_ENABLED=0
ENV GOARCH=amd64
WORKDIR /build
COPY . .
RUN go build -o httpserver ./

FROM alpine
WORKDIR /server
COPY --from=build /build/httpserver ./
EXPOSE 8080
ENTRYPOINT ["./httpserver"]

